package org.jeecg.modules.xmss.service;

import com.aliyuncs.exceptions.ClientException;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.xmss.entity.XmssIdea;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @Description: 选民意见建议表
 * @Author: jeecg-boot
 * @Date:   2020-09-18
 * @Version: V1.0
 */
public interface IXmssIdeaService extends IService<XmssIdea> {

	/**
	 * 添加一对多
	 *
	 */
	public void saveMain(XmssIdea xmssIdea) ;

	/**
	 * 修改一对多
	 *
	 */
	public void updateMain(XmssIdea xmssIdea);

	/**
	 * 删除一对多
	 */
	public void delMain (String id);

	/**
	 * 批量删除一对多
	 */
	public void delBatchMain (Collection<? extends Serializable> idList);

	/**
	 * 处理意见建议
	 */
	void manageIdea(String id ,Integer state,String content ,String picture ,Integer type,Integer answerType,Integer starDb,String userId) throws ClientException;
	/**
	 * 办事统计
	 */
	Map<String ,Object> thingData(int type);

	/**
	 * 评价统计
	 */
	Map<String ,Object> pjData(int type,int personType);

	/**
	 * 首页--今日已办、待处理、已完成、好评数
	 */
	Map<String ,Object> indexData();

	/**
	 * 首页-意见反馈件数统计
	 */
	Map<String ,Object> indexIdeaData();


	IPage<XmssIdea> personIdea(String userId,Integer pageNo ,Integer pageSize);

	IPage<XmssIdea> jbIdea(String userId,Integer pageNo ,Integer pageSize);

	void downWords(HttpServletRequest request, HttpServletResponse response);

}
